package chapter8;

/**
 * 字符串转换为数字
 */
public class Demo1 {
    public static void main(String[] args) {
        String[] str = {"89","21","10","18","35"};
        int sum = 0;
        for (int i = 0; i < str.length ; i++) {
            int myint = Integer.parseInt(str[i]);
            sum += myint;
        }
        System.out.println("sum : " + sum);
    }
}
